package com.example.demo.Service;

import com.example.demo.mapper.MessageMapper;
import com.example.demo.model.Message;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class MessageService {
    @Autowired
    MessageMapper messageMapper;

    public void addMessage(Message message){
        messageMapper.insertMessage(message);
    }

    public List<Message> selectAllMessage(){
        return messageMapper.selectAllMessage();
    }
}
